package com.ydles.goods.dao;

import com.ydles.goods.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Component
public interface BrandMapper extends Mapper<Brand> {

    //根据分类的名称来查询品牌   #:会解析为一个字符串  &:会解析为一个占位符
    @Select("select NAME,AGE from tb_brand where category_name = #{categoryName}")
    public List<Map> findByCategoryName(@Param("categoryName") String categoryName);

}
